<%@page import="java.util.Calendar"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Locale"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ page language="java" import="java.sql.*" %>
<title>Cerca</title>

<script language="javascript">
var adulti=<%=(Integer)session.getAttribute("Adulti")%>;
var ragazzi=<%=(Integer)session.getAttribute("Ragazzi")%>;
var bambini=<%=(Integer)session.getAttribute("Bambini")%>;
var dataR = '<%=(String)session.getAttribute("DataRitorno")%>';
var dataP = '<%=(String)session.getAttribute("DataPartenza")%>';
var adeparture='<%=(String)session.getAttribute("AeropPartenza")%>';
var aarrival='<%=(String)session.getAttribute("AeropDestinazione")%>';
var cdeparture='<%=(String)session.getAttribute("CittaPartenza")%>';
var carrival='<%=(String)session.getAttribute("CittaDestinazione")%>';
var ndeparture='<%=(String)session.getAttribute("StatoPartenza")%>';
var narrival='<%=(String)session.getAttribute("StatoDestinazione")%>';
var scaloAnd="no";
var scaloRit="no";
<%
if(session.getAttribute("ScaloAnd")!=null){
	out.println("scaloAnd="+"'"+(String)session.getAttribute("ScaloAnd")+"'"+";");
	session.removeAttribute("ScaloAnd");
}
if(session.getAttribute("ScaloRit")!=null){
	out.println("scaloRit="+"'"+(String)session.getAttribute("ScaloRit")+"'"+";");
	session.removeAttribute("ScaloRit");
}
%>
</script>


<style type="text/css" title="currentStyle">
			@import "css/demo_table.css";
			@import "css/jquery.tooltip.css";
			@import "css/jquery-ui-1.8.12.custom.css";
			@import "css/jquery.qtip.css";
			@import url(http://fonts.googleapis.com/css?family=Montez);
		</style>
<script type="text/javascript" language="javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.tooltip.js"></script>
<script src="js/jquery.ui.core.js"></script>
<script src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.ui.mouse.js"></script>
<script src="js/jquery.ui.slider.js"></script>
<script type="text/javascript" language="javascript" src="js/tab.js"></script>	
<script type="text/javascript" language="javascript" src="js/jquery.qtip.js"></script>	
</head>
<body>
<table width=100% border="0">
	<tr>
		<td width=15% rowspan="2" valign="bottom"><img src="IMG/ominosx_m.gif" alt="last minute sx" align="right"/></td>
    	<td width=70% height="150">
			<table width=100% height=100% border="0">
 				<tr height=15%><td>Tutte le migliori offerte on-line per viaggiare.
   				</td></tr><tr height=35%><td></td></tr>
 				<tr height=50% ><td>
 				<a href="index.jsp" style="text-decoration: none; color: #000000"><img src="IMG/logo_mini.gif" alt="dovrei partire logo" height="75" style="vertical-align:bottom"/><font FACE="Montez" size="22"> Dovrei... Partire!</font></a>
   				</td></tr>
			</table> 
		</td>
      	<td width=15% rowspan="2" valign="middle"><img src="IMG/ominodx_m.gif" alt="last minute dx" align="left"/></td>
   </tr>
   <tr>
   	<td>
   	<BR>
   	<BR>
   	
Andata:<br/>
<table width=100%>
<tr><td colspan="2" align="center"><nobr><input type="button" name="AndPrec" value="Giorno precedente" OnClick="javascript:changeAnd('prec')">  <b id="dataAnd"></b>  <input type="button" name="AndSuc" value="Giorno successivo" OnClick="javascript:changeAnd('suc')"></nobr>
</td></tr><tr><td>
Escludi dalla ricerca:
<input type="hidden" id="partA" name="partA" value="">
<br>Aereoporti partenza:
<div id="selPartAnd">
</div>
<input type="hidden" id="destA" name="partA" value="">
<br>Aereoporti destinazione:
<div id="selDestAnd">
</div>
	<br><label for="amountA">Price range:</label>
	<input type="text" id="amountA" style="border:0; color:#f6931f; font-weight:bold;" />
	<br><div id="slider-rangeA"></div><br>
	<button type="button" id="scaloAnd" OnClick="javascript:scalo('and');">Non solo voli diretti</button>
</td><td>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="andata" width=100%>
	<thead>
		<tr>
			<th>Codice volo </th>
			<th>Partenza </th>
			<th>Arrivo </th>
			<th>Ora Partenza </th>
			<th>Ora Arrivo </th>
			<th>Durata (minuti)</th>
			<th>- </th>
			<th>Scali </th>
			<th>Costo del volo </th>			
		</tr>
	</thead>
	<tbody>
</tbody>
</table>
   </tr>
  </table>
<% 
if(session.getAttribute("DataRitorno")!=null){
	%>
	Ritorno:<br/>
	<table width=100%>
	<tr><td colspan="2"  align="center"><nobr><input type="button" name="RitPrec" value="Giorno precedente" OnClick="javascript:changeRit('prec')">  <b id="dataRit"></b>  <input type="button" name="RitSuc" value="Giorno successivo" OnClick="javascript:changeRit('suc')"></nobr>
	</td></tr><tr><td>
	Escludi dalla ricerca:
<input type="hidden" id="partR" name="partR" value="">
<br>Aereoporti partenza:
<div id="selPartRit">
</div>
<input type="hidden" id="destR" name="partR" value="">
<br>Aereoporti destinazione:
<div id="selDestRit">
</div>
	<br><label for="amountR">Price range:</label>
	<input type="text" id="amountR" style="border:0; color:#f6931f; font-weight:bold;" />
	<br><div id="slider-rangeR"></div><br>
	<button type="button" id="scaloRit" OnClick="javascript:scalo('rit');">Non solo voli diretti</button>
	</td><td>
	<table cellpadding="0" cellspacing="0" border="0" class="display" id="ritorno" width=100%>
	<thead>
		<tr>
			<th>Codice volo </th>
			<th>Partenza </th>
			<th>Arrivo </th>
			<th>Ora Partenza </th>
			<th>Ora Arrivo </th>
			<th>Durata  (minuti)</th>
			<th>- </th>
			<th>Scali </th>
			<th>Costo del volo </th>			
		</tr>
	</thead>
	<tbody>
	</tbody>
	</table>
   	</tr>
  	</table>
<% }
%>
<div style="text-align:center"><input type="button" id="procedi" value="Procedi" OnClick="javascript:void(0)"></div>
	</td>
   </tr>
</table> 

</body>
</html>
<%
if(session.getAttribute("DataPartenza")==null||session.getAttribute("StatoPartenza")==null||session.getAttribute("StatoDestinazione")==null) response.sendRedirect("index.jsp");
//session.removeAttribute("DataPartenza");
//session.removeAttribute("DataRitorno");
%>
